package service.impl;

import dao.TeacherDao;
import dao.impl.TDaoImpl;
import dao.impl.TeacherDaoImpl;
import entity.Teacher;
import service.TeacherService;

import java.util.List;

public class TeacherServiceImpl implements TeacherService {
private TeacherDao teacherDao=new TDaoImpl();

    public int addTeacher(Teacher teacher) throws Exception{

        return teacherDao.addTeacher(teacher);
    }
/*根据编号查询*/
    @Override
    public Teacher getTeacherByTno(int tno) throws Exception{

        return teacherDao.getTeacherByTno(tno);
    }

    @Override
    public List<Teacher> getTeacherList() throws Exception {
        List<Teacher> teacherList = teacherDao.getTeacherList();
        return teacherList;
    }
}
